home *** CD-ROM | disk | FTP | other *** search
-
-
-
- iiiinnnniiiittttttttaaaabbbb((((4444)))) iiiinnnniiiittttttttaaaabbbb((((4444))))
-
-
-
- NNNNAAAAMMMMEEEE
- inittab - script for the init process
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The /_e_t_c/_i_n_i_t_t_a_b file supplies the script to _i_n_i_t's role as a general
- process dispatcher. The process that constitutes the majority of _i_n_i_t's
- process dispatching activities is the line process /_e_t_c/_g_e_t_t_y that
- initiates individual terminal lines. Other processes typically
- dispatched by _i_n_i_t are daemons and the shell.
-
- The _i_n_i_t_t_a_b file is composed of entries that are position dependent and
- have the following format:
-
- id:rstate:action:process
-
- Each entry is started with a character other than #### and ended by a
- newline. Lines starting with #### are ignored. A backslash (\\\\) preceding a
- newline indicates a continuation of the entry. Up to 512 characters per
- entry are permitted. Comments can be inserted in the _p_r_o_c_e_s_s field using
- the _s_h(1) convention for comments. Comments in the _p_r_o_c_e_s_s field of
- lines that spawn _g_e_t_t_ys are displayed by the _w_h_o(1) command. Such
- _p_r_o_c_e_s_s field comments can contain information about the line such as its
- location. There are no limits (other than maximum entry size) imposed on
- the number of entries within the _i_n_i_t_t_a_b file. The entry fields are:
-
- _i_d This field, of up to four characters, is used to uniquely
- identify an entry.
-
- _r_s_t_a_t_e This defines the run-level in which this entry is to be
- processed. Run-levels effectively correspond to a
- configuration of processes in the system. That is, each
- process spawned by _i_n_i_t is assigned a run-level or run-levels
- in which it is allowed to exist.
-
- The run-levels are represented by the letter ssss (or SSSS), or a
- number ranging from 0000 through 6666. As an example, if the system
- is in run-level 1111, only those entries having a 1111 in the _r_s_t_a_t_e
- field are processed.
-
- When _i_n_i_t is requested to change run-levels, all processes that
- do not have an entry in the _r_s_t_a_t_e field for the target run-
- level are sent the warning signal (SSSSIIIIGGGGTTTTEEEERRRRMMMM) and allowed a grace
- period (see _i_n_i_t(1M) for the length of this grace period),
- before being forcibly terminated by a kill signal (SSSSIIIIGGGGKKKKIIIILLLLLLLL).
-
- The _r_s_t_a_t_e field can define multiple run-levels for a process
- by selecting more than one run-level in any combination from
- 0000----6666, ssss, and SSSS. If no run-level is specified, the process is
- assumed to be valid at all run-levels.
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- iiiinnnniiiittttttttaaaabbbb((((4444)))) iiiinnnniiiittttttttaaaabbbb((((4444))))
-
-
-
- There are three other values, aaaa, bbbb, and cccc, that can appear in
- the _r_s_t_a_t_e field, even though they are not true run-levels.
- Entries that have these characters in the _r_s_t_a_t_e field are
- processed only when the _t_e_l_i_n_i_t (see _i_n_i_t(1M)) process requests
- them to be run (regardless of the current run-level of the
- system). They differ from run-levels in that _i_n_i_t can never
- enter run-level aaaa, bbbb, or cccc. Also, a request for the execution
- of any of these processes does not change the current run-
- level. Furthermore, a process started by an aaaa, bbbb, or cccc command
- is not killed when _i_n_i_t changes levels. They are only killed
- if their line in /_e_t_c/_i_n_i_t_t_a_b is marked ooooffffffff in the _a_c_t_i_o_n
- field, their line is deleted entirely from /_e_t_c/_i_n_i_t_t_a_b, or
- _i_n_i_t goes into the SINGLE USER state.
-
- _a_c_t_i_o_n Key words in this field tell _i_n_i_t how to treat the process
- specified in the _p_r_o_c_e_s_s field. The _a_c_t_i_o_ns recognized by _i_n_i_t
- are as follows:
-
- rrrreeeessssppppaaaawwwwnnnn If the process does not exist then start the
- process. Do not wait for its termination
- (continue scanning the _i_n_i_t_t_a_b file) and when it
- dies restart the process. If the process
- currently exists then do nothing and continue
- scanning the _i_n_i_t_t_a_b file.
-
- wwwwaaaaiiiitttt Upon _i_n_i_t's entering the run-level that matches
- the entry's _r_s_t_a_t_e, start the process and wait for
- its termination. All subsequent reads of the
- _i_n_i_t_t_a_b file while _i_n_i_t is in the same run-level
- causes _i_n_i_t to ignore this entry.
-
- oooonnnncccceeee Upon _i_n_i_t's entering a run-level that matches the
- entry's _r_s_t_a_t_e, start the process, do not wait for
- its termination. When it dies, do not restart the
- process. If upon entering a new run-level, the
- process is still running from a previous run-level
- change, the program is not restarted.
-
- bbbbooooooootttt The entry is to be processed only at _i_n_i_t's boot-
- time read of the _i_n_i_t_t_a_b file. _i_n_i_t is to start
- the process and not wait for its termination.
- When it dies, _i_n_i_t does not restart the process.
- In order for this instruction to be meaningful,
- the _r_s_t_a_t_e should be the default or it must match
- _i_n_i_t's run-level at boot time. This action is
- useful for an initialization function following a
- hardware reboot of the system.
-
- bbbboooooooottttwwwwaaaaiiiitttt The entry is to be processed the first time _i_n_i_t
- goes from single-user to multi-user state after
- the system is booted. (If iiiinnnniiiittttddddeeeeffffaaaauuuulllltttt is set to
- 2222, the process runs right after the boot.) _i_n_i_t
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- iiiinnnniiiittttttttaaaabbbb((((4444)))) iiiinnnniiiittttttttaaaabbbb((((4444))))
-
-
-
- starts the process, waits for its termination and,
- when it dies, does not restart the process.
-
- ppppoooowwwweeeerrrrffffaaaaiiiillll Execute the process associated with this entry
- only when _i_n_i_t receives a power fail signal
- (SSSSIIIIGGGGPPPPWWWWRRRR,,,, see _s_i_g_n_a_l(2)).
-
- ppppoooowwwweeeerrrrwwwwaaaaiiiitttt Execute the process associated with this entry
- only when _i_n_i_t receives a power fail signal
- (SSSSIIIIGGGGPPPPWWWWRRRR) and wait until it terminates before
- continuing any processing of _i_n_i_t_t_a_b.
-
- ooooffffffff If the process associated with this entry is
- currently running, send the warning signal
- (SSSSIIIIGGGGTTTTEEEERRRRMMMM) and wait 20 seconds before forcibly
- terminating the process via the kill signal
- (SSSSIIIIGGGGKKKKIIIILLLLLLLL). If the process is nonexistent, ignore
- the entry.
-
- oooonnnnddddeeeemmmmaaaannnndddd This instruction is really a synonym for the
- rrrreeeessssppppaaaawwwwnnnn action. It is functionally identical to
- rrrreeeessssppppaaaawwwwnnnn but is given a different keyword in order
- to divorce its association with run-levels. This
- is used only with the aaaa, bbbb or cccc values described
- in the _r_s_t_a_t_e field.
-
- iiiinnnniiiittttddddeeeeffffaaaauuuulllltttt An entry with this _a_c_t_i_o_n is only scanned when
- _i_n_i_t initially invoked. _i_n_i_t uses this entry, if
- it exists, to determine which run-level to enter
- initially. It does this by taking the highest
- run-level specified in the _r_s_t_a_t_e field and using
- that as its initial state. If the _r_s_t_a_t_e field is
- empty, this is interpreted as 0000111122223333444455556666 and so _i_n_i_t
- enters run-level 6666. Additionally, if _i_n_i_t does
- not find an iiiinnnniiiittttddddeeeeffffaaaauuuulllltttt entry in /_e_t_c/_i_n_i_t_t_a_b, it
- requests an initial run-level from the user at
- reboot time.
-
- ssssyyyyssssiiiinnnniiiitttt Entries of this type are executed before _i_n_i_t
- tries to access the console (before the CCCCoooonnnnssssoooolllleeee
- LLLLooooggggiiiinnnn:::: prompt). It is expected that this entry
- will be used only to initialize devices on which
- _i_n_i_t might try to ask the run-level question.
- These entries are executed and waited for before
- continuing.
-
- _p_r_o_c_e_s_s This is a _s_h command to be executed. The entire pppprrrroooocccceeeessssssss field
- is prefixed with _e_x_e_c and passed to a forked _s_h as sssshhhh ----cccc ''''eeeexxxxeeeecccc
- _c_o_m_m_a_n_d''''. For this reason, any legal _s_h syntax can appear in
- the _p_r_o_c_e_s_s field. Comments can be inserted with the
- ;;;; ####_c_o_m_m_e_n_t syntax.
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- iiiinnnniiiittttttttaaaabbbb((((4444)))) iiiinnnniiiittttttttaaaabbbb((((4444))))
-
-
-
- FFFFIIIILLLLEEEESSSS
- /etc/inittab
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- getty(1M), init(1M), sh(1), who(1), exec(2), open(2), signal(2).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-